<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
		<style type="text/css">
			.mui-content {
				margin-top: 12px;
			}
			
			.mui-input-group {
				margin-left: 2px;
				margin-right: 2px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">IEMS登陆页面  </h1>
		</header>
		<div class="mui-content">
			<form class="mui-input-group">
				<div class="mui-input-row">
					<label for="">账号</label>
					<input type="text" class="mui-input mui-input-clear" id="account" placeholder="请输入账号" />
				</div>
				<div class="mui-input-row">
					<label for="">密码</label>
					<input type="password" class="mui-input mui-input-clear" id="password" placeholder="请输入密码" />
				</div>
			</form>
			<div class="mui-content-padded">
				<button id="login" class="mui-btn mui-btn-block mui-btn-primary">登陆</button>
			</div>

		</div>
		<script type="text/javascript">
			mui.plusReady(function() {
				//读取本地存储，检查是否为首次启动
				login.addEventListener('tap', function() {
					mui.ajax('http://222.223.231.137:8008/IEMS_APP_IOSg/APP/loginIn', {
						data: {
						param: '{"proVersion":"1.0","data":{"productsFlag":"1","password":"'+new_pass+'","account":"'+aaa+'"}}'
						},
						dataType: 'jsonp', //服务器返回json格式数据
						type: 'post', //HTTP请求类型
						timeout: 10000, //超时时间设置为10秒；
						success: function(data) {
							mui.toast(data);
							var jsonObj = window.JSON.parse(data);
							var resutldata = jsonObj.data;

							if (jsonObj.resultCode == "1") {
								window.location.href="index-menu.html?sessionid="+resutldata.sessiond+"&accountid="+resutldata.accountId;
								mui.toast('修改成功！');
					
							} else {
								mui.toast('修改失败！');
							}
						},
						error: function(xhr, type, errorThrown) {
						}
					});
				});
			});
		</script>
	</body>

</html>